import request from '@/utils/request';
import Constants from "@/utils/constants";

/** 获取列表 POST  */
export async function systemLogin(params: any, options?: { [key: string]: any }) {
  return request<API.BaseRes>(`${Constants.SERVICE_ROOT}/comm/login/system`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
    ...(options || {}),
  });
}

export async function adminLogin(params: any, options?: { [key: string]: any }) {
  return request<API.BaseRes>(`${Constants.SERVICE_ROOT}/comm/login/admin`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: params,
    ...(options || {}),
  });
}

